﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using OpenQA.Selenium;

namespace Net.Fly.Article.AutoSubmit
{
    public abstract class AbstractSubmit : ISubmit
    {
        protected String m_rootURL = "http://goarticles.com";
        protected String m_memberURL = "http://goarticles.com/members/";
        protected String m_userName = "brihgt.lee@gmail.com";
        protected String m_password = "Passw0rd1";
        protected String m_loginURL = "http://goarticles.com/members/";
        protected String m_submitURL = "http://goarticles.com/submit/";
        protected String m_mainCatagory = "Technology";
        protected String m_subCatagory = "Information Technology";
        protected String m_title = "Some tips of moving to cloud";
        protected String m_article = "<p>Once the organization's assets are identified and classified, the security chains<br>should be defined and put into place.<br>A security chain must protect the organization's information assets at all levels,<br>including physical security, technical security, and procedural and legal steps.<br>Physical security includes measures such as restricting access to data centers,<br>shredding paper documents and destroying tapes and hard drives. Technical<br>security includes everything from the basics of firewalls and access control<br>systems to more advanced techniques such as disabling USB ports. Finally,<br>procedures for handling information assets must be clearly defined and<br>adequately explained to all employees of the organization. In some cases, the<br>procedures may include legal requirements such as laws covering the retention<br>or destruction of data.<br>Once the organization has classified its information assets and defined the risks<br>and requirements for using them, the decision to move to the cloud will be more<br>straightforward. Moving extremely valuable information to the cloud, especially a<br>non-  cloud, can pose risks that outweigh any benefits of using cloud<br>computing.<br>In some cases the legal restrictions imposed on certain classes of information will<br>make it impossible to move that information to a non-  cloud. Using a<br>  cloud might still be an option, but a   cloud has risks as well. Moving<br>information to a   cloud might increase the number of the organization's<br>employees who have access to the machines that store and process it. The<br>security chain must be modified to include everyone with access.<br>As with any migration, moving to the cloud carries with it some requirements and<br>risks. In most cases, moving to the cloud does not introduce new risks, it merely<br>changes the nature of the existing ones. In addition, the threat posed by each<br>risk varies depending on the type of cloud. Security is always a concern, but<br>security in a non-  cloud involves more variables than security in a  <br>cloud.<br>Although this paper covers a broad set of common risks, requirements and<br>scenarios, each of those can be affected by the type of cloud being used. For the<br>purposes of this paper, risks and requirements will be discussed in terms of<br>  clouds versus non-  clouds. All of the resources of a   cloud<br>are inside an organization's firewall; all other types of clouds (the public, hybrid<br>and community clouds of the NIST definitions) have at least part of their<br>resources on a shared network.<p>Once the organization's assets are identified and classified, the security chains<br>should be defined and put into place.<br>A security chain must protect the organization's information assets at all levels,<br>including physical security, technical security, and procedural and legal steps.<br>Physical security includes measures such as restricting access to data centers,<br>shredding paper documents and destroying tapes and hard drives. Technical<br>security includes everything from the basics of firewalls and access control<br>systems to more advanced techniques such as disabling USB ports. Finally,<br>procedures for handling information assets must be clearly defined and<br>adequately explained to all employees of the organization. In some cases, the<br>procedures may include legal requirements such as laws covering the retention<br>or destruction of data.<br>Once the organization has classified its information assets and defined the risks<br>and requirements for using them, the decision to move to the cloud will be more<br>straightforward. Moving extremely valuable information to the cloud, especially a<br>non-  cloud, can pose risks that outweigh any benefits of using cloud<br>computing.<br>In some cases the legal restrictions imposed on certain classes of information will<br>make it impossible to move that information to a non-  cloud. Using a<br>  cloud might still be an option, but a   cloud has risks as well. Moving<br>information to a   cloud might increase the number of the organization's<br>employees who have access to the machines that store and process it. The<br>security chain must be modified to include everyone with access.<br>As with any migration, moving to the cloud carries with it some requirements and<br>risks. In most cases, moving to the cloud does not introduce new risks, it merely<br>changes the nature of the existing ones. In addition, the threat posed by each<br>risk varies depending on the type of cloud. Security is always a concern, but<br>security in a non-  cloud involves more variables than security in a  <br>cloud.<br>Although this paper covers a broad set of common risks, requirements and<br>scenarios, each of those can be affected by the type of cloud being used. For the<br>purposes of this paper, risks and requirements will be discussed in terms of<br>  clouds versus non-  clouds. All of the resources of a   cloud<br>are inside an organization's firewall; all other types of clouds (the public, hybrid<br>and community clouds of the NIST definitions) have at least part of their<br>resources on a shared network.";
        protected String m_bio = "I'm a software engineer with more than 10 years development experience";
        protected String m_bioPlain = "";
        protected String m_author = "Bright";
        protected String m_errMessage = "";

        protected String m_summary = "";
        protected String[] m_keywords = { "article submission", "backlink", "SEO" };
        protected String m_primarySearchPhrase = "article submission SEO backlink";
        // for resource box
        protected String m_webURL = "http://www.articlewritebee.com/";

        protected SubmitStatus m_status = SubmitStatus.NEW;

        protected IWebDriver m_driver;


        public SubmitStatus GetStatus()
        {
            return m_status;
        }

        public String GetErrMessage()
        {
            return m_errMessage;
        }

        public abstract bool Login();
        public abstract String GetArticleURL();
        public abstract bool Submit();
    }
}
